package restaurant.gui;

import java.awt.EventQueue;

import javax.swing.ImageIcon;
import javax.swing.JFrame;

import restaurant.ManagerUI;

/**
 * The application window for the OIY_Restaurant system.
 * 
 * @author Odessa
 */
public class Restaurant
{

	/** The application frame. */
	private JFrame frame;

	/** The actions performed by the manager. */
	public static ManagerUI actions;

	/** The ERROR_ICON. */
	public final static ImageIcon ERROR_ICON = new ImageIcon(
			"resources/error.png");

	/** The QUESTION_ICON. */
	public final static ImageIcon QUESTION_ICON = new ImageIcon(
			"resources/question.png");

	/** The icon for the menu. */
	public final static ImageIcon MENU = new ImageIcon("resources/iconmen.png");

	/** The icon for the reports. */
	public final static ImageIcon REPORT = new ImageIcon(
			"resources/numbers-icon.png");

	/** The icon for editing. */
	public final static ImageIcon EDIT = new ImageIcon("resources/edit.png");



	/**
	 * Create the application.
	 */
	public Restaurant() {
		actions = new ManagerUI();
		// new LoadData();
		initialize();
	}



	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize()
	{
		ImageIcon icon = new ImageIcon("resources/icon.jpg");

		frame = new ManagerView();
		frame.setTitle("Order-It-Yourself Restaurant");
		frame.setIconImage(icon.getImage());
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setResizable(false);
	}



	/**
	 * Launch the application.
	 * 
	 * @param args the arguments.
	 */
	public static void main(String[] args)
	{
		EventQueue.invokeLater(new Runnable() {
			public void run()
			{
				try {
					Restaurant window = new Restaurant();
					window.frame.setVisible(true);
				}
				catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

}
